/**
 *
 */
package asa;

/**
 * @author José
 *
 */
public class CompositeStatement extends Statement {

	public CompositeStatement(StatementList statementList) {
		this.statementList = statementList;
	}

	/* (non-Javadoc)
	 * @see asa.Statement#genJava(asa.PWInterface)
	 */
	@Override
	public void genJava(PWInterface pw) {
		genJava(pw, null);
	}

	/* (non-Javadoc)
	 * @see asa.Statement#genJava(asa.PWInterface)
	 */
	@Override
	public void genJava(PWInterface pw, Env env) {
		pw.println("{");
		pw.add();
		statementList.genJava(pw, env);
		pw.sub();
		pw.printlnIdent("}");

	}

	private StatementList statementList;

}
